﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="supplier_edit.aspx.cs" Inherits="LinkCard.AdminCP.Supplier.supplier_edit" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../Uploadify/CSS/uploadify.css" />
    <script type="text/javascript" src="../Uploadify/Scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../Uploadify/Scripts/jquery.uploadify.js"></script>
    <script type="text/javascript">
        $(window).load(
        function () {
            $("#<%=FileUpload3.ClientID %>").fileUpload({
                'uploader': '../Uploadify/Scripts/uploader.swf',
                'cancelImg': 'images/cancel.png',
                'buttonText': 'Browse Files',
                'script': 'Upload.ashx',
                'folder': 'uploads',
                'fileDesc': 'File Desc(JPG, PNG, GIF, PDF, DOC, DOCX)',
                'fileExt': '*.jpg;*.png;*.gif;*.pdf;*.doc;*.docx;',
                'sizeLimit': '500000000',
                'multi': true,
                'auto': true,
                'onComplete': function (event, ID, fileObj, response, data) {


                    $(".uploadLogo").val(response);
                    $("#imgLogo").attr("src", "/FileUpload/Supplier/" + response);
                    $("#divLogo").show();
                }
            });
            $("#<%=FileUpload4.ClientID %>").fileUpload({
                'uploader': '../Uploadify/Scripts/uploader.swf',
                'cancelImg': 'images/cancel.png',
                'buttonText': 'Browse Files',
                'script': 'Upload.ashx',
                'folder': 'uploads',
                'fileDesc': 'File Desc(JPG, PNG, GIF, PDF, DOC, DOCX)',
                'fileExt': '*.jpg;*.png;*.gif;*.pdf;*.doc;*.docx;',
                'sizeLimit': '500000000',
                'multi': true,
                'auto': true,
                'onComplete': function (event, ID, fileObj, response, data) {

                    $(".uploadLogoHome").val(response);
                    $("#imgLogoHome").attr("src", "/FileUpload/Supplier/" + response);
                    $("#divLogoHome").show();

                }
            });

            $("#<%=FileUpload5.ClientID %>").fileUpload({
                'uploader': '../Uploadify/Scripts/uploader.swf',
                'cancelImg': 'images/cancel.png',
                'buttonText': 'Browse Files',
                'script': 'Upload.ashx',
                'folder': 'uploads',
                'fileDesc': 'File Desc(JPG, PNG, GIF, PDF, DOC, DOCX)',
                'fileExt': '*.jpg;*.png;*.gif;*.pdf;*.doc;*.docx;',
                'sizeLimit': '500000000',
                'multi': true,
                'auto': true,
                'onComplete': function (event, ID, fileObj, response, data) {

                    $(".uploadBannerUudaidacbiet").val(response);
                    $("#imgBannerUudaidacbiet").attr("src", "/FileUpload/Supplier/" + response);
                    $("#divBannerUudaidacbiet").show();

                }
            });

            $("#<%=FileUpload1.ClientID %>").fileUpload({
                'uploader': '../Uploadify/Scripts/uploader.swf',
                'cancelImg': 'images/cancel.png',
                'buttonText': 'Browse Files',
                'script': 'Upload.ashx',
                'folder': 'uploads',
                'fileDesc': 'File Desc(JPG, PNG, GIF, PDF, DOC, DOCX)',
                'fileExt': '*.jpg;*.png;*.gif;*.pdf;*.doc;*.docx;',
                'sizeLimit': '500000000',
                'multi': true,
                'auto': true,
                'onComplete': function (event, ID, fileObj, response, data) {


                    $(".uploadAuthorizationStatement").val(response);
                    $("#imgAuthorizationStatement").attr("src", "/FileUpload/Supplier/" + response);
                    $("#divAuthorizationStatement").show();
                }
            });
            $("#<%=FileUpload2.ClientID %>").fileUpload({
                'uploader': '../Uploadify/scripts/uploader.swf',
                'cancelImg': 'images/cancel.png',
                'buttonText': 'Browse Files',
                'script': 'Upload.ashx',
                'folder': 'uploads',
                'fileDesc': 'File Desc(JPG, PNG, GIF, PDF, DOC, DOCX)',
                'fileExt': '*.jpg;*.png;*.gif;*.pdf;*.doc;*.docx;',
                'sizeLimit': '500000000',
                'multi': true,
                'auto': true,
                'onComplete': function (event, ID, fileObj, response, data) {


                    $(".uploadContractStatement").val(response);
                    $("#imgContractStatement").attr("src", "/FileUpload/Supplier/" + response);
                    $("#divContractStatement").show();
                }
            });
        }
    );
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <section id="content">
        <section class="container_12 clearfix">
            <section id="main" class="grid_12">
                <article>
                    <div class="h1">Cập nhật công ty bán hàng</div>

                    <dl class="inline">
                        <fieldset>
                            <legend>Thông tin công ty</legend>
                            <dt>
                                <label>Tên công ty:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Name" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                             <dt>
                                <label>Ẩn (công ty sở hữu nhiều nhãn hàng):</label>
                            </dt>
                            <dd>
                                <asp:CheckBox ID="SupplierTransparency" runat="server" />
                            </dd>
                            <dt>
                                <label>Công ty sở hữu:</label>
                            </dt>
                            <dd>
                                <asp:DropDownList ID="SupplierParentID" runat="server"></asp:DropDownList>
                            </dd>
                             <dt>
                                <label>Danh mục:</label>
                            </dt>
                            <dd>
                                <asp:DropDownList ID="CategoryID" runat="server"></asp:DropDownList>
                            </dd>
                            <dt>
                                <label>Logo:</label>
                            </dt>
                            <dd>
                                <input type="hidden" id="LogoHome" runat="server" size="75" class="uploadLogoHome" />
                                <div style="display: none" id="divLogoHome">
                                    <img src="" style="border: 0px;" alt="logo" id="imgLogoHome" />
                                </div>
                                <asp:FileUpload ID="FileUpload4" runat="server" />
                            </dd>
                            <dt>
                                <label>Banner:</label>
                            </dt>
                            <dd>
                                <input type="hidden" id="Logo" runat="server" size="75" class="uploadLogo" />
                                <div style="display: none" id="divLogo">
                                    <img src="" style="border: 0px;" alt="logo" id="imgLogo" />
                                </div>
                                <asp:FileUpload ID="FileUpload3" runat="server" />
                            </dd>
                             <dt>
                                <label>Banner Ưu đãi đặc biệt:</label>
                            </dt>
                            <dd>
                                <input type="hidden" id="BannerUudaidacbiet" runat="server" size="75" class="uploadBannerUudaidacbiet" />
                                <div style="display: none" id="divBannerUudaidacbiet">
                                    <img src="" style="border: 0px;" alt="logo" id="imgBannerUudaidacbiet" />
                                </div>
                                <asp:FileUpload ID="FileUpload5" runat="server" />
                            </dd>
                            <dt>
                                <label>Website:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="WebsiteAdd" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Giám đốc:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Director" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Địa chỉ:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Address" TextMode="MultiLine" Rows="4" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Google map:</label>
                            </dt>
                            <dd>
                                <FCKeditorV2:FCKeditor ID="fckGoogleMap" runat="server" BasePath="~/fckeditor/" Height="200px">
                                </FCKeditorV2:FCKeditor>
                            </dd>
                            <dt>
                                <label>Số điện thoại:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Phone" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Fax:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Fax" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Email:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Email" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Mã số thuế:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="TaxCode" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Người liên hệ:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="ContactPersonName" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Email người liên hệ:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="ContactPersonMail" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Ngành nghề kinh doanh:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Business" TextMode="MultiLine" Rows="4" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Sao kê ủy quyền(up ảnh):</label>
                            </dt>
                            <dd>
                                <input type="hidden" id="AuthorizationStatement" runat="server" size="75" class="uploadAuthorizationStatement" />
                                <div style="display: none" id="divAuthorizationStatement">
                                    <img src="" style="border: 0px;" alt="logo" id="imgAuthorizationStatement" />
                                </div>
                                <asp:FileUpload ID="FileUpload1" runat="server" />
                            </dd>
                            <dt>
                                <label>Hợp đồng số:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="ContractNumber" CssClass="big" runat="server"></asp:TextBox>
                            </dd>
                            <dt>
                                <label>Sao kê hợp đồng(up ảnh):</label>
                            </dt>
                            <dd>
                                <input type="hidden" id="ContractStatement" runat="server" size="75" class="uploadContractStatement" />
                                <div style="display: none" id="divContractStatement">
                                    <img src="" style="border: 0px;" alt="logo" id="imgContractStatement" />
                                </div>
                                <asp:FileUpload ID="FileUpload2" runat="server" />
                            </dd>
                            <dt>
                                <label>Về đối tác:</label></dt>
                            <dd>
                                <FCKeditorV2:FCKeditor ID="Introduction" runat="server" BasePath="~/fckeditor/" Height="500px">
                                </FCKeditorV2:FCKeditor>
                            </dd>
                            <dt>
                                <label>Tags:</label>
                            </dt>
                            <dd>
                                <input type="text" class="medium" id="txtTags" runat="server" />
                            </dd>

                            <ul class="tabs">
                                <li><a href="#gold">Gold</a></li>
                               <%-- <li><a href="#diamond">Diamond</a></li>
                                <li><a href="#platinum">Platinum</a></li>--%>
                            </ul>
                            <div class="tabcontent">
                                <div id="gold">
                                    <dl class="inline">
                                        <dt>
                                            <label>% Giảm giá:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="DiscountPercent" CssClass="big" runat="server"></asp:TextBox>
                                            (%)
                                        <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                                                ErrorMessage="Chưa nhập % Giảm giá" ControlToValidate="DiscountPercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" Display="Dynamic"
                                                ControlToValidate="DiscountPercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>
                                        <dt>
                                            <label>% Nguyên Giá:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="PricePercent" CssClass="big" runat="server"></asp:TextBox>
                                            (%)
                                   <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                                ErrorMessage="Chưa nhập % Nguyên giá" ControlToValidate="PricePercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" Display="Dynamic"
                                                ControlToValidate="PricePercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>

                                        <dt>
                                            <label>Tính điểm:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="PointPercent" CssClass="big" runat="server"></asp:TextBox>
                                            (VND / điểm)
                                  <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                                ErrorMessage="Chưa nhập % Tính điểm" ControlToValidate="PointPercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
                                                ControlToValidate="PointPercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>
                                    </dl>
                                </div>
                                <%--<div id="diamond">
                                    <dl class="inline">
                                        <dt>
                                            <label>% Giảm giá:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="DiamondDiscountPercent" CssClass="big" runat="server"></asp:TextBox>
                                            (%)
                    <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
                                                ErrorMessage="Chưa nhập % Giảm giá" ControlToValidate="DiamondDiscountPercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" Display="Dynamic"
                                                ControlToValidate="DiamondDiscountPercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>
                                        <dt>
                                            <label>% Nguyên Giá:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="DiamondPricePercent" CssClass="big" runat="server"></asp:TextBox>
                                            (%)
               <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server"
                                                ErrorMessage="Chưa nhập % Nguyên giá" ControlToValidate="DiamondPricePercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" Display="Dynamic"
                                                ControlToValidate="DiamondPricePercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>

                                        <dt>
                                            <label>Tính điểm:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="DiamondPointPercent" CssClass="big" runat="server"></asp:TextBox>
                                            (VND / điểm)
              <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server"
                                                ErrorMessage="Chưa nhập % Tính điểm" ControlToValidate="DiamondPointPercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator8" runat="server" Display="Dynamic"
                                                ControlToValidate="DiamondPointPercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>
                                    </dl>
                                </div>
                                <div id="platinum">
                                    <dl class="inline">
                                        <dt>
                                            <label>% Giảm giá:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="PlatinumDiscountPercent" CssClass="big" runat="server"></asp:TextBox>
                                            (%)
                    <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server"
                                                ErrorMessage="Chưa nhập % Giảm giá" ControlToValidate="PlatinumDiscountPercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" Display="Dynamic"
                                                ControlToValidate="PlatinumDiscountPercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>
                                        <dt>
                                            <label>% Nguyên Giá:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="PlatinumPricePercent" CssClass="big" runat="server"></asp:TextBox>
                                            (%)
               <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server"
                                                ErrorMessage="Chưa nhập % Nguyên giá" ControlToValidate="PlatinumPricePercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator10" runat="server" Display="Dynamic"
                                                ControlToValidate="PlatinumPricePercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>

                                        <dt>
                                            <label>Tính điểm:</label>
                                        </dt>
                                        <dd>
                                            <asp:TextBox ID="PlatinumPointPercent" CssClass="big" runat="server"></asp:TextBox>
                                            (VND / điểm)
              <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server"
                                                ErrorMessage="Chưa nhập % Tính điểm" ControlToValidate="PlatinumPointPercent" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator11" runat="server" Display="Dynamic"
                                                ControlToValidate="PlatinumPointPercent"
                                                ErrorMessage="Phải nhập số" ForeColor="Red"
                                                ValidationExpression="\d+" />
                                        </dd>
                                    </dl>
                                </div>--%>
                            </div>
                        </fieldset>
                        <fieldset>
                            <legend>Thông tin Đăng nhập</legend>
                            <dt>
                                <label>Tên đăng nhập SHOP CP:</label>
                            </dt>
                            <dd>
                                <asp:TextBox ID="Username" CssClass="big" runat="server"></asp:TextBox>
                                <br />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3"
                                    runat="server"
                                    ErrorMessage="Chưa điền Tên đăng nhập" ControlToValidate="Username" ForeColor="Red"></asp:RequiredFieldValidator>

                            </dd>
                            <dt>
                                <label>Mật khẩu đăng nhập SHOP CP:</label>
                            </dt>
                            <dd>
                                <asp:TextBox TextMode="Password" ID="PasswordNew" CssClass="big" runat="server"></asp:TextBox>

                            </dd>

                            <dt>
                                <label>Xác nhận Mật khẩu SHOP CP:</label>
                            </dt>
                            <dd>
                                <asp:TextBox TextMode="Password" ID="CfmPass" CssClass="big" runat="server"></asp:TextBox>
                                <br />
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="Xác nhận Mật khẩu chưa đúng"
                                    ControlToCompare="PasswordNew" ControlToValidate="CfmPass" ForeColor="Red"></asp:CompareValidator>

                            </dd>
                        </fieldset>
                    </dl>
                    <p>

                        <input type="hidden" id="SupplierID" runat="server" />
                        <input type="hidden" id="Status" runat="server" />
                        <input type="hidden" id="Password" runat="server" />
                        <asp:Button class="button big" Text="Duyệt" ID="btnAccept" runat="server"
                            OnClick="btnAccept_Click" Style="width: auto;" />
                        <asp:Button class="button white" Text="Từ chối" ID="btnDrop" runat="server"
                            OnClick="btnDrop_Click" />
                        <asp:Button class="button big" Text="Chuyển duyệt" ID="btnPublish" runat="server"
                            OnClick="btnPublish_Click" Style="width: auto;" />
                        <asp:Button class="button big" Text="Lưu tạm" ID="btnUpdate" runat="server"
                            OnClick="btnUpdate_Click" Style="width: auto;" />
                        <asp:Button class="button white" Text="Xóa" ID="btnDel" runat="server"
                            OnClick="btnDel_Click" />
                    </p>

                </article>
            </section>
        </section>
    </section>
</asp:Content>
